﻿    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
using System.Data.SqlClient;
using WebBanHang.DTO;

    namespace WebBanHang
    {
        public class DNDangNhap
        {
            public static void Them(DoanhNGhiep  dn)
            {
                string sql = "insert into DOANHNGHIEP (USERNAME,PASSWORD,Email,TenCongTy,SDT,DiaChi) values (@USERNAME,@PASSWORD,@Email,@TenCongTy,@SDT,@DiaChi)";
                SqlCommand cmd = new SqlCommand(sql);
                SqlParameter[] pr = {new SqlParameter("@USERNAME",dn.USERNAME),
                                    new SqlParameter("@PASSWORD",dn.PASSWORD ),
                                    new SqlParameter("@Email",dn.EMAIL ),                                    
                                    new SqlParameter("@TenCongTy",dn.TenCongTy ),
                                    new SqlParameter("@SDT",dn.SDT),
                                    new SqlParameter("@DiaChi",dn.DiaChi)};
                DataProvider.ExecuteNonQuery(cmd, pr);
            }
        }
    }